import store from "@/store/index";
import router from "@/router/index"
import {ElMessage} from "element-plus";

export function LoginJudge() {
    if (store.state.username == null && store.state.level == null && store.state.mail == null) {
        ElMessage({
            type: 'warning',
            message: "请登录!"
        })
        router.push('/');
    } else {
        return null
    }
}